/**
 * Copyright (c) Huawei Technologies Co., Ltd. 2025. All rights reserved.
 * This file is a part of the CANN Open Software.
 * Licensed under CANN Open Software License Agreement Version 1.0 (the "License").
 * Please refer to the License for details. You may not use this file except in compliance with the License.
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
 * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
 * See LICENSE in the root of the software repository for the full text of the License.
 */

/*!
 * \file conv3d_dw_cycle_calculator.h
 * \brief
 */
#ifndef OPS_BUILT_IN_OP_TILING_CUBE_ALGORITHM_CONV3D_DW_CALCULATOR_CYCLE_CALCULATOR_H_
#define OPS_BUILT_IN_OP_TILING_CUBE_ALGORITHM_CONV3D_DW_CALCULATOR_CYCLE_CALCULATOR_H_

#include "cube/algorithm/calculator/cycle_calculator.h"

namespace optiling {
namespace cachetiling {
class Conv3DDwCycleCalculator : public CycleCalculator {
 public:
  Conv3DDwCycleCalculator(SingleCoreStatus &core_status);
  ~Conv3DDwCycleCalculator() override = default;
  bool Init(const CubeTilingParam &params) override;

 protected:
  void GenBlockDimsMapFactors() override;
  bool IsValidBatchDim(int32_t batch_dim) const override;
  void UpdateTilingShape() override;
  bool LoopBlockDims(bool prune, int32_t used_core) override;

 private:
  std::vector<int32_t> dout_dims_factors_;
  std::vector<int32_t> kd_dims_factors_;

  int32_t d_dim_ = 1;
  int32_t kd_dim_ = 1;
};
}  // namespace cachetiling
}  // namespace optiling

#endif  // OPS_BUILT_IN_OP_TILING_CUBE_ALGORITHM_CONV3D_DW_CALCULATOR_CYCLE_CALCULATOR_H_